package cn.edu.guet.gythtglxt.controller;

import cn.edu.guet.gythtglxt.entity.tb_natmeha_hotspot;
import cn.edu.guet.gythtglxt.mapper.IndexMapper;
import cn.edu.guet.gythtglxt.service.index.IndexServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class IndexController {
    @Autowired
    IndexMapper hotSpotMapper;

    @Autowired
    IndexServices indexServices;

    @RequestMapping("/getAllHost")
    public List<tb_natmeha_hotspot> getAllHost(){
        List<tb_natmeha_hotspot> list = indexServices.selectHotSpotList(1,6);
        list.forEach(System.out::println);
        return list;
    }
}
